<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>原型</title>
</head>
<body>
<div></div>
<div></div>
<div></div>
<script>

  // 初始化 构造器内高于原型链
  function Najia() {
    this.swung = false;
    this.swing = function () {
      return !this.swung
    }
  }

  Najia.prototype.swing = function () {
    return this.swung
  }

  var najia = new Najia();
  // console.log(najia.constructor);

</script>
</body>
</html>